package com.mxdx.edu.dao;

import com.mxdx.edu.common.BaseDao;
import com.mxdx.edu.model.ExamLibraryTitle;
import com.mxdx.edu.model.ExamStudentRecord;
import com.mxdx.edu.model.StudentScore;

import java.util.List;
import java.util.Map;

public interface ExamLibraryDao extends BaseDao<ExamLibraryTitle> {

    //region 获取试题

    Map<String, Object> findExamTitleByMap(Map<String, Object> param);

    List<Map<String,Object>> findExamSubjectByMap(Map<String, Object> param);

    List<Map<String,Object>> findExamMainByMap(Map<String, Object> param);

    Map<String,Object> findExamMainTestByMap(Map<String, Object> param);

    List<Map<String,Object>> findExamOptionByMap(Map<String, Object> param);

    List<Map<String,Object>> findExamAnswerByMap(Map<String, Object> param);

    List<Map<String,Object>> findExamExplainByMap(Map<String, Object> param);

    //endregion

    //region 学生考试答题 列表

    List<ExamStudentRecord> findExamStudentRecordByMap(Map<String, Object> param);

    int findExamStudentCountByMap(Map<String, Object> param);

    List<Map<String,Object>> findExamStudentTestIdsByMap(Map<String, Object> param);

    //学生考试答题保存
    int examStudentSave(ExamStudentRecord examStudentRecord);

    int examStudentUpdate(ExamStudentRecord examStudentRecord);

    int examStudentDelete(ExamStudentRecord examStudentRecord);

    //endregion

    //region 学生成绩

    StudentScore findStudentScoreByMap(Map<String, Object> param);

    int studentScoreSave(StudentScore studentScore);

    int studentScoreUpdate(StudentScore studentScore);

    //endregion
    //获取非主观试题分数
    double findNotSubjectiveScore(Map<String, Object> param);
}
